﻿@model OnlineBookstore.Models.BookDetailsInfo

@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@Model.BookName - 书籍详情 | 网上书城</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        :root {
            --primary-color: #6c5ce7;
            --primary-dark: #5649c0;
            --secondary-color: #a8a4e6;
            --text-color: #2d3436;
            --light-bg: #f8f9fa;
            --card-shadow: 0 8px 24px rgba(0,0,0,0.08);
            --radius: 12px;
            --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Noto Serif SC', serif;
            color: var(--text-color);
            background-color: #f5f7fa;
            line-height: 1.6;
            min-height: 100vh;
        }

        /* 布局容器 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 页眉样式 */
        .header {
            background-color: white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-color);
            text-decoration: none;
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
        }

        /* 主要内容区 */
        .main-content {
            padding: 40px 0;
        }

        .book-detail-container {
            background: white;
            border-radius: var(--radius);
            box-shadow: var(--card-shadow);
            overflow: hidden;
            padding: 30px;
            margin-top: 30px;
        }

        .page-title {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--primary-color);
        }

        /* 书籍详情布局 */
        .book-detail {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 40px;
        }



        /* 书籍封面 */
        .book-cover-container {
            position: relative;
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
            height: 400px;
        }

        .book-cover {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }

        .book-cover-container:hover .book-cover {
            transform: scale(1.03);
        }

        /* 书籍信息 */
        .book-info {
            display: flex;
            flex-direction: column;
        }

        .book-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: var(--text-color);
        }

        .book-author {
            font-size: 1.2rem;
            color: #636e72;
            margin-bottom: 1.5rem;
        }

        .book-meta {
            margin-bottom: 2rem;
        }

        .meta-item {
            display: flex;
            margin-bottom: 0.8rem;
            align-items: center;
        }

        .meta-label {
            font-weight: 600;
            min-width: 80px;
            color: #636e72;
        }

        .meta-value {
            flex: 1;
        }

        .meta-icon {
            color: var(--primary-color);
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }

        /* 价格区域 */
        .price-section {
            margin-top: auto;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .book-price {
            font-size: 2rem;
            color: var(--primary-color);
            font-weight: 700;
            margin: 1rem 0;
        }

        /* 按钮样式 */
        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 24px;
            border-radius: var(--radius);
            font-weight: 600;
            text-decoration: none;
            transition: var(--transition);
            cursor: pointer;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
            border: none;
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
        }

        .btn-outline {
            background-color: transparent;
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
        }

        .btn-outline:hover {
            background-color: rgba(108, 92, 231, 0.1);
            transform: translateY(-2px);
        }

        .btn i {
            margin-right: 8px;
        }

        /* 页脚样式 */
        .footer {
            text-align: center;
            padding: 30px 0;
            margin-top: 60px;
            border-top: 1px solid #eee;
            color: #636e72;
            font-size: 0.9rem;
        }


    </style>
</head>
<body>
    <!-- 页眉 -->
    <header class="header">
        <div class="container header-content">
            <a href="/" class="logo">
                <i class="fas fa-book-open"></i>
                <span>网上书城</span>
            </a>
            <div id="loginmsg">
                <!-- 登录状态信息 -->
            </div>
        </div>
    </header>

    <!-- 主要内容区 -->
    <main class="main-content">
        <div class="container">
            <h1 class="page-title">书籍详情</h1>

            <div class="book-detail-container">
                <div class="book-detail">
                    <!-- 书籍封面 -->
                    <div class="book-cover-container">
                        <img src="@Model.Bookcover" class="book-cover" alt="@Model.BookName 封面">
                    </div>

                    <!-- 书籍信息 -->
                    <div class="book-info">
                        <h2 class="book-title">@Model.BookName</h2>
                        <div class="book-author">
                            <i class="fas fa-user-edit"></i> @Model.BookAuthor
                        </div>

                        <div class="book-meta">
                            <div class="meta-item">
                                <span class="meta-icon"><i class="fas fa-barcode"></i></span>
                                <span class="meta-label">编号:</span>
                                <span class="meta-value">@Model.BookCode</span>
                            </div>

                            <div class="meta-item">
                                <span class="meta-icon"><i class="fas fa-building"></i></span>
                                <span class="meta-label">出版社:</span>
                                <span class="meta-value">@Model.Bookpress</span>
                            </div>

                            <div class="meta-item">
                                <span class="meta-icon"><i class="fas fa-tag"></i></span>
                                <span class="meta-label">分类:</span>
                                <span class="meta-value">@Model.Booksort</span>
                            </div>
                        </div>

                        <div class="price-section">
                            <div class="book-price">¥@Model.BookPrice</div>

                            <div class="action-buttons">
                                <a href="@Url.Action("GetBookId", new { id = Model.Id })" class="btn btn-primary">
                                    <i class="fas fa-shopping-cart"></i> 立即购买
                                </a>
                                <a href="@Url.Action("Index")" class="btn btn-outline">
                                    <i class="fas fa-arrow-left"></i> 返回列表
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p>网上书城 — MVC 项目 © @DateTime.Now.Year</p>
        </div>
    </footer>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script>
        // 这里可以添加交互脚本
        $(document).ready(function () {
            // 可以根据需要添加交互效果
        });
    </script>
</body>
</html>